const app = getApp();
const api = require('../../utils/api');

Page({
    data: {
        memberAccountList: [],
        memberAccountTotal: 0,
    },
    onLoad(options) {
    },
    onShow() {
        this.getMemberAccount();
    },

    getMemberAccount() { //获取会员充值账户
        let params = {
            pageNum: 1,
            pageSize: 100
        }
        api.post('/user/account/page', params)
            .then(res => {
                this.setData({
                    memberAccountList: res.content,
                    memberAccountTotal: res.total
                })
            })
    },
    viewAccountDetail(id) { //查看账户流水
        wx.navigateTo({
            url: '/pages/memberAccountDetail/memberAccountDetail?shopId=' + id,
        });
    },
})